#include "GrammarAnalyzer.h"

#include <iostream>
#include <iomanip>
int yyparse(void);

GrammarAnalyzer::GrammarAnalyzer(const std::string &srcFileName):
	wa(srcFileName)
{
	pST = NULL;
	pTCG = NULL;
}

int GrammarAnalyzer::parse(SymbolTable *pST, TemporaryCodeGenerator *pTCG)
{
	this->pST = pST;
	this->pTCG = pTCG;
	yyparse();
	/*
	while(wa.getToken()){
		std::cout <<"parse : " <<std::setw(12) << wa.tokenName
			<< std::setw(12) << wa.tokenType
			<< std::setw(12) << wa.lineNumber
			<< std::endl;
	}*/
	return 0;
}
